import * as qs from "qs";
import { post } from "@/api/httpRequest";
import * as Config from "@/config";

const BASE_URI = Config.HTTP_SERVER + "/kgeditor";

/**
 * 添加某一种类型
 * @param data
 * @param success
 * @param error
 * @param final
 */
export function addTypeAPI (data,success,error,final){
  post(BASE_URI + "/addType",data,success,error,final);
}

/**
 * 删除类型
 * @param data
 * @param success
 * @param error
 * @param final
 */
export function deleteTypeAPI (data,success,error,final){
  post(BASE_URI + "/deleteType",qs.stringify(data),success,error,final);
}

/**
 * 修改某一类型名称
 * @param data
 * @param success
 * @param error
 * @param final
 */
export function modifyTypeAPI (data,success,error,final){
  post(BASE_URI + "/fixType",data,success,error,final);
}

